package com.xmall.product.service.remote;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmall.define.base.Result;
import com.xmall.define.dto.es.EsSkuDto;
import com.xmall.define.request.es.EsSpuSearchRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 微服务 - search：search
 */
@FeignClient(value = "xmall-search")
public interface SearchServiceFeign {

    /**
     * 获取总数量
     */
    @PostMapping("/service/search/product/count")
    Result<Long> count(@RequestBody EsSpuSearchRequest request);

    /**
     * 分页列表
     */
    @PostMapping("/service/search/product/listPage")
    Result<Page<EsSkuDto>> listPage(@RequestBody EsSpuSearchRequest request);
}
